import axios from '../http.js'; // 导入http中创建的axios实例
import qs from 'qs'

const unityInfo = {
    getAssToken() {
        return axios.post(`/iot/save`)
    },
    // 创建优秀人员
    createCultivate(params) {
        return axios({
            method: 'get',
            url: '/cultivate/create',
            params
        });
    },
    // 查詢优秀人员
    cultivateList(params) {
        return axios({
            method: 'get',
            url: '/cultivate/index',
            params
        });
    },
    deleteCultivate(id) {
        return axios({
            method: 'delete',
            url: '/cultivate/' + id
        })
    },
    editCultivate(id,params) {
        return axios({
            method: 'put',
            url: '/cultivate/' + id,
            params
        })
    },
    // 创建成果
    createAchievement(params) {
        return axios({
            method: 'get',
            url: '/achievement/create',
            params
        })
    },
    achievementList(params) {
        return axios({
            method: 'get',
            url: '/achievement/index',
            params
        })
    },
    deleteAchievement(id) {
        return axios({
            method: 'delete',
            url: '/achievement/' + id
        })
    },
    editAchievement(id,params) {
        return axios({
            method: 'put',
            url: '/achievement/' + id,
            params
        })
    },
}

export default unityInfo;
